<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title> Edit User </title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/Style.css" />
<link href='http://fonts.googleapis.com/css?family=Lily+Script+One' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Rock+Salt' rel='stylesheet' type='text/css'>



</head>

<%
String visitorName=null;
Cookie cookie= null;
Cookie[] cookies=request.getCookies();
if(cookies!=null){
	for(int i=0; i<cookies.length; i++){
		cookie=cookies[i];
		if(cookie.getName().compareTo("user")==0)
		visitorName=cookie.getValue();
		
	}
}
%>
<%@ page import="java.util.ArrayList,es.ats.codington.festival.domain.Visitor" %>
<% Visitor visitor = (Visitor) request.getAttribute("visitor");%>

<body>
<header class="cabecera">

<div class="image">

	<img src="Images/Skyline.png" alt="My title image">

	

		<div class="login"> 
 		<img src="Images/icon.png" alt="icono">
 		
 		<a href="#"><%= visitorName %></a> / <a href="index.htm">LogOut</a>
</div>
</div>

<!-- Menu -->
<nav class="nav"> 
	<ul class="menu">
		<li><a href="index2.htm"> Home</a></li>
		<li><a href="#"> North Town</a>
			<ul>
				<li><a href="museum.htm"> Museum</a></li>
				<li><a href="theater.htm"> Theater</a></li>
				<li><a href="stadium.htm"> Stadium</a></li>
				<li><a href="business.htm"> Business</a></li>
			</ul>
		</li>
		<li><a href="#"> South Town</a>
			<ul>
				<li><a href="park.htm"> Park</a></li>
				<li><a href="zoo.htm"> Zoo</a></li>
				<li><a href="attractions.htm"> Attractions</a></li>
				<li><a href="markets.htm"> Markets</a></li>
			</ul>
		</li>
		<li>
			<li><a href="show_events.htm"> Events</a></li>
		</li>
	</ul>
 </nav>


</header>

<div class="Container">
	<h2>Edit User</h2>

<!-- Form edit user -->
<div id="marcoForm">
	<form action="editUser.htm" method="post" name="form">
		<label for="nombre" > First Name*:</label>
		<input type="text" name="nombre" id= "nombre" value="<%= visitor.getFirstName()%>" placeholder="between 1-30 characters" minlength="1" maxlength="30" tabindex="1" required/> 
		<br>
		<br>
		<label for="apell"> Last Name*:</label>
		<input type="text" name="apell" id= "apell" value="<%= visitor.getLastName()%>" placeholder="between 1-30 characters" minlength="1" maxlength="30"  tabindex="2" required/> 
		<br>
		
		<br>
		<label for="email"> Email*:</label>
		<input type="email" name="email" id= "email" value="<%= visitor.getEmail()%>" placeholder="between 3-200 characters" minlength="3" maxlength="200"  tabindex="3"  required/> 
		<br>
		<br>
		<label  for="dni"> DNI*:</label>
		<input type="text" name="dni" id= "dni" value="<%= visitor.getDni()%>" placeholder="00.000.000-X" minlength="12" maxlength="12"  tabindex="4" pattern="[0-9]{2}[.]{1}[0-9]{3}[.]{1}[0-9]{3}[-]{1}[A-Z]{1}" required/> 
		<br>
		<br>
		<label for="phone"> Number Phone*:</label>
		<input type="text" name="phone" id= "phone" value="<%= visitor.getnPhone()%>" placeholder="between 10-20 characters" minlength="9" maxlength="20"  tabindex="5" required/> 
		<br>
		<br>
		<label for="adress"> Adress:</label>
		<input type="text" name="adress" id= "adress" value="<%= visitor.getAddress()%>" placeholder="between 0-30 characters" minlength="0" maxlength="30"  tabindex="6" required/>
		<label> Optional</label>
		<br>
		<br>

		<input type="submit" value="Save">
		
		<!--password update page button -->
		<div class="button" style="float:right">
			<a href="passwordUpdate.htm" class="bu">Password Update</a>
		</div>
	</form>
</div>

</div>


<footer> Copyright @ 2015 All rights reserved </footer>

</body>

</html>